home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / zc1755e.arc / ADVPHO.T next >
Text File  |  1990-03-14  |  31KB  |  857 lines

  1.     ::rev 3-13-90 for ZCOMM 17.28+
  2.     cls; goto cmdch
  3. ak    lput "\r\n\E[1;5mType space to Continue\E[m"; if y
  4.     lput "\E[2A\E[2K"
  5. busy    speed 1200 putw "ATM0H1\r"
  6. reset    speed 1200; putw "ATZ\r";pat 1 OK; wait -f3
  7. twx    if twxout speed 1200 %s8 f -qxh twxout;o
  8.     else echo " No file to Send. "
  9. att    set l 0; set m "0503"; set alds ",50312345678901,"
  10.     echo "Set for AT&T Calling Card"
  11. ddd    set l "1"; set m "1"; set alds ""
  12.     echo "Set for Direct Distance Dialing (Station to Station)"
  13. tryd    %telno
  14.  
  15.  
  16. waketb    put "\b\b\b"; sleep 3; pat; purgel; kill; pat 1i "A"; pat 9 OK; ena -d
  17.     while "L<5&&!m" mput "A" lput "!" sleep 2
  18.     wait -f2; if !1 while "L<4&&!m" mput "A" lput "@" sleep 3
  19.     if 1 put "TZ\r"; wait -f2
  20.     if 9 goto wak1
  21.     pat 1 ""; while "!9&&L<2" put "ATZ\r"  wait -f3
  22.     if 9 goto wak1
  23.     bye
  24.     while "L<9&&!m" mput "A" lput "#" sleep 3
  25.     pat 1i "A"; wait -f2; if !1 while "L<5&&!m" mput "A" lput "$" sleep 3
  26.     if 1 put "TZ\r"; wait -f2
  27.     if 9 goto wak1
  28.     pat 1 ""; while "!9&&L<2" put "ATZ\r"  wait -f3
  29.     if 9 goto wak1
  30.     sp 9600 echo "9600 bps"
  31.     bye; br; br; br; while "!9&&L<2" put "ATZ\r"  wait -f1
  32.     if 9 goto wak1
  33.     echo "2400 bps"; sp 2400
  34.     while "!9&&L<3" put "ATZ\r"  wait -f1
  35.     if 9 goto wak1
  36.     echo "1200 bps"; sp 1200
  37.     while "!9&&L<3" put "ATZ\r"  wait -f1
  38.     if 9 goto wak1
  39.     while "!9&&L<10" put "AT\r"  wait -f1
  40.     if 9 goto wak1
  41.     echo "No response From MODEM" dis -Q
  42.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  43.     if 9 goto wak1
  44.     echo "No response From MODEM"
  45.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  46.     if 9 goto wak1
  47.     echo "No response From MODEM: setting 2400 bps"; sp 2400
  48.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  49.     if 9 goto wak1
  50.     echo "No response From MODEM: setting 1200 bps"; sp 1200
  51.     while "!9&&L<20" o sleep 9 bye sleep 9 put "ATZ\r"  wait -f2
  52.     if 9 goto wak1
  53.     echo "No response From MODEM"
  54. wak1:    pat; pat 1i A
  55.     if iMODEM,C2400E sp 2400
  56.     while "L<9&&!m" mput "A" lput "%" sleep 3
  57.     wait -f2; if !1 while "L<9&&!m" mput "A" lput "^" sleep 3
  58.     pat; pat 1l "OK"; put "T\r"; wait -f3
  59.     if !1 putw "AT\r"
  60.     dis -t;  ret
  61.  
  62.  
  63. ::
  64. :: Dial script for most 2400 bps modems uses speed fallback.
  65. ::  Environment variable MODEM checked for:
  66. ::    C2400E    US Robotics Courier 2400E (MNP)
  67. ::    HST    US Robotics Courier HST
  68. ::    HV96    Hayes V series 9600 bps
  69. ::    MM224    MultiTech 224
  70. ::    MM224E    MultiTech 224E (MNP)
  71. ::    MMV32    MultiTech MultiModemV32
  72. ::    SM1200    Hayes Smartmodem 1200
  73. ::    TB    Telebit TrailBLazer
  74. :: If the call is placed at >300 and <9600 bps, switch to 2400 bps.  Make the
  75. :: call.  If the called modem only supports 1200 or (ugh) 300 bps,
  76. :: the modem will drop back in speed.  The actual connect speed is indicated
  77. :: by a "CONNECT", "CONNECT 1200", or "CONNECT 2400" string.
  78. :: Fallback to 300 bps may be a bit messey, (depending on the answering
  79. :: modem, so a call originated at 300  bps will go out at that speed
  80. ::
  81. ::  It is important to give Xn value with highest possible n, e.g. X4
  82. ::
  83. ::  String vars: s0: original speed   s1:non empty to lock interface speed
  84. ::    s2: Current dial option   s3:Current telno
  85. ::      s4: Remaining alternate telnums    s5: provisional speed
  86. ::
  87. mm224    if "itelno,1" if dX echo "Vritual Channel 1"; return
  88.     if "itelno,2" if dX echo "Vritual Channel 2"; return
  89.     if "itelno,3" if dX echo "Vritual Channel 3"; return
  90.     if "itelno,1" port 1;  set dirrx "";  echo "Port 1"; return
  91.     if "itelno,2" port 2;  set dirrx "";  echo "Port 2"; return
  92.     if "%telno<2" echo "Please do not use \"call mm224\""; abort
  93.     if iMODEM,MM224 if S>2500 sp 2400
  94.     if iMODEM,MM224E if S>9600 sp 9600
  95.     if iMODEM,MMV32 if S>19200 sp 19200
  96.     if iMODEM,SM1200 if S>1201 sp 1200
  97.     if iMODEM,C2400E sp 2400
  98.     set? s0 S;  sets s4 %telno
  99. mm2l:    split s4 "+" ""; sets s4 %z1; sets s3 %z0
  100.     set s1 ""; split s3 "/" ""; sets s3 %z0; sets s2 %z1
  101.     handshake sw;  pat;  sets s5 "%s0"
  102.     echo "PORT = %dport  MODEM = %MODEM  modifier = %s2"
  103.     if js2,mnp set s1 "mnp"
  104.     if js2,_s set s1 "_s"
  105.     if js2,lock set s1 "lock"
  106.     if iMODEM,AX9624 if js2,mnp sp 19200
  107.     if iMODEM,TB if S>3000 if !%s1 set s1 "lock"
  108.     if js2,1200 sp 1200; set s5 1200
  109.     else if js2,300 sp 300; set s5 300
  110.     else if S==450 sp 300 echo "300 bps"
  111.     else if !%s1 if "S<9500&&S>1201" sp 2400 echo "2400 bps"
  112.     bye
  113.     gosub waketb        :: get modem to respond
  114.     if iMODEM,C2400E sp 2400
  115.     pat; pat 9 OK
  116.     if pMODEM,MM if js2,mnp   put "AT&E2 &E4 &E13 \44BA0 &B0\r"; wait -f2
  117.     if pMODEM,MM if js2,mnp_s put "AT&E2 &E5 &E13 \44BA0 &B0\r"; wait -f2
  118.     if iMODEM,HST if !js2,mnp put "AT&M0 X6 &B0 &H0 &R1 &I0\r"; wait -f2
  119.     if iMODEM,HST if js2,mnp put "AT&W\r";  wait -f2
  120.     if iMODEM,HST if js2,mnp put "AT&M5 X6 &B2 &H1 &R2 &I0 &K1\r"; wait -f2
  121.     if iMODEM,HST if js2,mnp_s put "AT&H2 &I1 &R1\r"; wait -f2
  122.     if iMODEM,C2400E if !js2,mnp put "AT&M0 &H0 &R1 &I0\r"; wait -f2
  123.     if iMODEM,C2400E if js2,mnp put "AT&M5 &H1 &R2 &I0 &K1\r"; wait -f2
  124.     if iMODEM,C2400E if js2,mnp_s put "AT&H2 &I1 &R1\r"; wait -f2
  125.     if iMODEM,AX9624 if js2,mnp put "ATX4\\V1\\J0\\A3\\N3\\Q3\r"; wait -f2
  126.     if iMODEM,AX9624 if js2,mnp_s put "ATX4\\V1\\J0\\A3\\N3\\Q1\r"; wait -f2
  127.     put "AT"
  128.     if pMODEM,MM if js2,a_mnp put "&E1 "
  129.     if pMODEM,MM if "as5<2500" put "\44MB%s5 "
  130.     if jMODEM,C2400E if js2,a_mnp put "&M4 "
  131.     if iMODEM,HST    if js2,a_mnp put "&M4 S15=16 "
  132.     if js2,v22 put "B0 "
  133.     ss s2 "(c:)(.*)";  if %z2 put "%z2 "        :: for extra commands
  134.     if iMODEM,TB if is5,300 put "S50=1 "
  135.     if iMODEM,TB if is5,1200 put "S50=2 "
  136.     if iMODEM,TB if is5,2400 put "S50=3 "
  137.     if iMODEM,TB if js2,fast z pW10000; put "S50=255 S7=50 "; if !%s1 set s1 "lock"
  138.     if iMODEM,TB if js2,mnp put "S95=1 "
  139.     if iMODEM,TB if js2,a_mnp put "S95=2 "
  140.     if iMODEM,TB if %s1 put "S66=1 S58=2 " if S==19200 put "S51=5 "
  141.     if iMODEM,TB if js2,_s put "S58=3 "
  142.     if iMODEM,TB if js2,v22 put "S90=1 "
  143.     if pMODEM,SM put "X3 "
  144.     if "%s3>8" put "S7=70 "        : longer wait if long distance
  145.     put "E1 Q0 S10=10 V1\r"; wait -f2
  146.     put "ATS6=3 S8=1 S0=0\r" wait -f2
  147.     if iMODEM,TB put "ATX3 S68=255 S111=0\r" wait -f2
  148.     if iMODEM,TB if js2,xmodem put "ATS111=20\r" wait -f2
  149.     if iMODEM,TB if js2,kermit put "ATS111=10\r" wait -f2
  150.     if pMODEM,MM put "ATX4 &Q0\r" wait -f2
  151.     if !%MODEM put "ATX3\r";  wait -f2    :: Change this for your modem
  152.     if iMODEM,C2400E if %s1 putw "AT&B6\r"; sp 9600
  153.     if %s1  if !Js1,s handshake slow; lput "Handshake SLOW: "
  154.     if %alds if ps3,0 putw "ATS8=10\r"
  155.     put "%mprefix";  put "%s3%alds";  dis -Q
  156.     if js2,man putw ";\r"; echo "Hit F1 when Tone is heard"; t; put "ATO"
  157.     put "\r";  dis -t
  158.     if "js3,;"  accept s1 "Lift Telephone Receiver, Hit ENTER"; o; return
  159.     pat 1 "CONNECT\r"; pat 2 "NO CARRIER"; pat 3 "BUSY"; pat 4 RING;
  160.     pat 5l "ECT 12"; pat 6l "ECT 24"; pat 7l "CONNECT FAST"
  161.     pat 8 "NO DIAL TONE"; pat 10l "CONNECT 300"
  162.     pat 11l "CONNECT 96"; pat 12l "CONNECT 192"
  163.     pat 13 "VOICE"; pat 14 "NO ANS"; pat 15l "CONNECT 4800"
  164.     wait -f72
  165.     while "4&&!L>3" wait -f40
  166.     if "n||9||2||3||4||13||14" goto sorry
  167.     dis -d
  168.     if dd while "!c&&L<20" sleep 1    : For modems with slow carrier det
  169.     if iMODEM,HST if "!hARQ" set s1 ""
  170.     if %s1 if "hCONNECT" ss y "[0-9]+"; estimate 0 z0; echo "Speed Locked"; goto mm2end
  171.     if "hARQ" echo "MNP Connected";  handshake both; goto arq
  172.     if "hREL" echo "MNP Connected";  handshake both; goto arq;
  173.     if "hERROR-CONTROL" echo "HV Connected";  handshake both; goto arq
  174.     if js2,mnp set s2 ""
  175. arq:    if "1||10" if is5,450 sp 450; echo "450 bps"; goto mm2end
  176.     if "1||10" sp 300 goto mm2end
  177.     if 5 sp 1200 goto mm2end
  178.     if 6 sp 2400 goto mm2end
  179.     if "du&&7" sp 9600 echo "9600 bps"; goto mm2end
  180.     if "7||12" sp 19200; goto mm2end
  181.     if iMODEM,HST  if "11|15" goto mm2end
  182.     if 11 sp 9600; goto mm2end
  183. sorry:    echo "No Connect Message Detected."
  184.     : if iMODEM,TB sleep 10; pat; pat 1 OK; putw "ATN?\r" wait
  185.     if iMODEM,C2400E if %s1 putw "ATZ\r"
  186.     if %s4 echo "Attempting %s4";  speed s0;  goback mm2l
  187.     pat; bye; bye; fail
  188. mm2end:    pat
  189.         if js1,mnp sleep 15    : for gliches in MM224E
  190.     sets telno %s3        : Telephone number we connected to
  191.     if !js2,nodel queue delete
  192.     return
  193.  
  194.  
  195.  
  196. askspd    lput "1200 baud?"; if y sp 1200; return
  197.     lput "2400 baud?"; if y sp 2400; return
  198.     lput "4800 baud?"; if y sp 4800; return
  199.     lput "9600 baud?"; if y sp 9600; return
  200.     lput "19200 baud?"; if y sp 19200; return
  201.     lput "300 baud then."; sp 300; return
  202. callcis    speed 1200
  203.     if %s3 sets telno %s3; gosub tryd; if c sleep 20 put \3 return
  204.     speed 300
  205.     if %s2 sets telno %s2; gosub tryd; if c sleep 20 put \3 return
  206.     sp 1200
  207.     if %s5 sets telno %s5; gosub tryd; if c gosub tym12; return
  208.     if %s4 sets telno %s4; gosub tryd; if c gosub tel12; return
  209.     echo "Sorry, none of the numbers are working right now"
  210.     gosub ak
  211.     fail
  212. tel12    pat 1 TERMINAL
  213.     while "c&&!1" put "\r" wait -f2
  214.     if !c fail
  215.     pat 1 @
  216.     put "D1\r"; wait -f40
  217.     if !c fail
  218.     if !1 o fail
  219.     put "C 202202\r"
  220.     return
  221. tym24    wait -f5
  222.     in !c fail
  223.     put A pat 1 "log in"; wait
  224.     put "%s1\r"; return
  225. tym12    pat 1 x; wait
  226.     if !c fail
  227.     put A pat 1 "log in"; wait
  228.     if !c fail
  229.     put "%s1\r"; return
  230. xsetup    port 1; : if !c speed 1200 putw "ATZ\r"
  231.     pd1; pz480    : turn on time stamping, set PST timezone
  232.     set mprefix ATDP    : Pulse Dial
  233.     : set mprefix ATDT    : Tone Dial
  234.     set mcommand "gosub mm224"
  235.     : set mcommand "gosub dial"
  236.     set l "1"; set m "1"
  237.     set answerback "\r\nYOUR NAME CITY\r\n\21"
  238.     : ps8 :set C/G status line attribute to dim
  239.     : set phones "c:/phones.t"
  240.     echo "Resetting Function Keys"; reskeys
  241.     set f3 @rb;  set f4 "@echo Working...;  gosub tlearn"
  242.     set f6 "@accept s2 Receive-File: rc %s2"
  243.     set f7 "@accept s1 Send-File: sx %s1"
  244.     : set f8 "\PXXXXX"
  245.     : accept xpassword "\E[mMaster Password: \E[8m"; lput "\E[m"
  246.     set f9 "@gosub add"
  247.     if fyamhelp.t set helpfile "yamhelp.t"; set f10 "@help"
  248.     if f/zmanh.hlp set helpfile "@!yhp /zmanh.hlp zmain"; set f10 "@help"
  249.     if fzmanh.hlp set helpfile "@!yhp zmanh.hlp zmain"; set f10 "@help"
  250.     set fs1 "@find speed %phones"
  251.     set fs2 "@accept s1 Name:; find \n%s1 %phones"
  252.     set fs3 "@find \\\;\r %phones"
  253.     set fs4 "@speed 1200 putw ATH\r"
  254.     set fs5
  255. @accept s1 "System name to call: "; queue add " call %s1"; queue list
  256.     set fs6
  257. @lput "Queue Entries:\n"; queue list; echo "Working..."; queue run
  258.     : display bell=visual
  259.     set emdir /memo; set twxfile twx;
  260.     : set call1 ATZ\r\336ATZ\r
  261.     set call2
  262. @bye; sleep 3; putw "ATZ\r"; sleep 5; putw "ATX1 M0 S0=1\r"; clears
  263.     : (AT commands above are repeated to make sure modem obeys them)
  264.     : set callpath /tmp/*.xx?
  265.     set outahost
  266. @bye; putw "ATZ\r"
  267.     :::  DO NOT USE BACKSLASHES FOR FILENAMES
  268.     : set calllog c:/calllog
  269.     : set rxlog c:/tmp/rxlog
  270.     : set txlog c:/tmp/txlog
  271.     : set tmp /yam/tmp
  272.     : set lib /yam/lib
  273.     set quitcmd \003\336off\r
  274.     if dc ps4 pn3 pr97    :if RGB, cyan, red stat, color rev video
  275.   : if dc ps11 pn14 pr30 :if RGB, yellow on black & rev. blue /w lt. bl. status
  276.     return
  277. setup    echo "Running ..."
  278.     set mprefix ATDP    : Pulse Dial
  279.     : set mprefix ATDT    : Tone Dial
  280.     p-1; set mcommand "gosub dial"
  281.     if da>1 goto setu1
  282.     if !flocal.t gosub sinit; gosub .local.t; goto setu1
  283.     gosub .local.t
  284.     echo "Hello %s6 %s7."
  285.     lput "Has your phone number or port configuration changed\r\n"
  286.     lput "since the last time you entered your name (y/n) ?"
  287.     if y del local.t; gosub sinit; gosub .local.t
  288.     if c gosub carrier
  289. setu1:    if dd pd1; pz480
  290.     pe0
  291.     set f3 @rb;  set f4 "@echo Working...;  gosub tlearn"
  292.     set f5 "@accept s1 Send-File(s): sz %s1"
  293.     set f6 "@accept s2 Receive-File: rc %s2"
  294.     set f7 "@accept s1 Send-File: sx %s1"
  295.     : set f8 "\PXXXXX"
  296.     set f9 "@gosub add"
  297.     set fs1 "@find speed %phones"
  298.     set fs2 "@accept s1 Name:; find \n%s1 %phones"
  299.     set fs3 "@find \\\;\r %phones"
  300.     set fs4 "@speed 1200 putw ATH\r"
  301.     set fs5
  302. @accept s1 "System name to call: "; queue add " call %s1"; queue list
  303.     set fs6
  304. @lput "Queue Entries:\n"; queue list; echo "Working..."; queue run
  305.     if fyamhelp.t set helpfile "yamhelp.t"; set f10 "@help"
  306.     if f/zmanh.hlp set helpfile "@!yhp /zmanh.hlp zmain"; set f10 "@help"
  307.     if fzmanh.hlp set helpfile "@!yhp zmanh.hlp zmain"; set f10 "@help"
  308.     if da>1 return
  309.     : return : uncomment this line to remove automatic menu startup
  310.     sets menu %phones
  311.     cls; goto cmdch
  312. demo    cls
  313. cmdch:    pv0; echo " ZCOMM Beginner's Menu "
  314.     display nlmode nooverstrike
  315.     lput "\ns  Generate a script with AI \E[1mTurboLearn Script Writer\E[m(Tm)\n"
  316.     if fnewscr.t lput "e  Execute your new script in newscr.t\n"
  317.     lput "f  Flash-up HELP Processor\n"
  318.     lput "a  Add a new system entry to the Telephone Directory\n"
  319.     lput "c  Compuserve Online Demo (requires modem)\n"
  320.     lput "d  Dial telephone number and connect\n"
  321.     lput "g  Go Local (Direct Connection)\n"
  322.     lput "h  Host Operation demo (dial-in)\n"
  323.     lput "l  List file names in current directory\n"
  324.     lput "n  Newest files listed first\n"
  325.     if !dS lput "o  Display Ordering Information\n"
  326.     lput "r  Review (circular buffer search/cut/paste) demo\n"
  327.     lput "t  Call Telegodzilla (Omen's Software Downloading System)\n"
  328.     lput "u  Utility command demo\n"
  329.     lput "x  eXit to DOS\n"
  330.     lput "z  exit to ZCOMM command prompt\n\n"
  331.     display nonlmode
  332. choos:    acceptl1 s1 "Please enter your menu choice "
  333.     if is1,a gosub add; cls; goback cmdch
  334.     if is1,c call cidemo; cls; goback cmdch
  335.     if is1,d call xdnum; cls; goback cmdch
  336.     if is1,e call .newscr.t;  goback choos
  337.     if is1,f help; goback cmdch
  338.     if is1,g call glocal; cls; goback cmdch
  339.     if is1,h gosub host; host; return
  340.     if is1,l dirr; goback choos
  341.     if is1,n dirt; goback choos
  342.     if is1,o gosub order; goback choos
  343.     if is1,r kill; gosub review; goback choos
  344.     if is1,s echo "Working...";  gosub tlearn; acceptl1 s0 "Hit Enter ";  goback cmdch
  345.     if is1,t call telegodzilla; cls; goback cmdch
  346.     if is1,u gosub udemo; cls; goback cmdch
  347.     if is1,x x
  348.     if is1,y goto quitt
  349.     if is1,z goto quitt
  350.     cls; echo "Unknown Command"; goback cmdch
  351. udemo:    cls;  echo "Enabling debug output to show the commands"; pv4
  352.     echo "The find command searches files for a string, case insensitive"
  353.     find zcom *.t
  354.     gosub ak
  355.     echo "The sum command calculates Unix compatible file checksums"
  356.     sum local.t
  357.     gosub ak
  358.     echo "Word Count: lines, words, printing characters, and characters"
  359.     echo "The count of printing characters predicts ribbon usage!"
  360.     wc *.t
  361.     gosub ak
  362.     echo "The crc command calculates a 32 bit file CRC useful for comparing"
  363.     echo "Multiple copies of the same file for accurcacy and identity."
  364.     echo "(Compatible with PKZIP's CRC)"
  365.     crc local.t
  366.     gosub ak
  367.     cls
  368.     echo "Paced upload transmission demonstration"
  369.     echo "File Upload pacing is used with bulletin boards, etc."
  370.     echo "Note the EXTRA delay at the end of each line"
  371.     display nooverstrike
  372.     open %phones
  373.     echo "Let's just send a little bit from the END of the file"
  374.     seek -120
  375.     ph2; o; t -adhxtp
  376.     close; pv0; dis -dah
  377.     gosub ak
  378.     return
  379.  
  380. 73    speed 1200 %l-603-924-9809 t
  381. amrad-bbs    speed 2400 %l-703-734-1387 t
  382. amsat-bbs    speed 300 %l-512-852-8194 t
  383. caf        speed 1200 %s8-3406\;
  384. cidemo    speed 1200 set s1 "cis02"; gosub callcis
  385.     pat 0 OK;
  386.     pat 1i ID:
  387.     pat 2 "please log in: "
  388.     pat 3 "DISCONNECTED"
  389.     pat 4 "?? LOG"
  390.     pat 5i "more !"
  391.     pat 6$ "!"
  392.     pat 7i "continue!"
  393.     wait;  put 77770,101\r
  394.     pat 1i assword:; wait; if !1 goto cid2
  395.     echo "Sending PASSWORD"; put FREE-DEMO\r
  396.     wait
  397. cid2:    if "3||2" echo " Login may be possible through a Compuserve Node "
  398.     if "1||4||3||2" echo " Try Again Later "; o; sleep 50; return
  399.     pat;
  400.     pat 1i "menu !"
  401.     pat 2i "page !"
  402.     pat 3i "choice !"
  403.     pat 4i "continue!"
  404.     pat 5i "more !"
  405.     pat 6$ "!"
  406.     put \25s\r
  407.     wait put "\025t\r"
  408.     wait put "\0253\r"
  409.     wait put "\025s 1\r"
  410.     wait put "\025log\r"
  411.     pat 1i ID:
  412.     wait -f5
  413.     echo "Good Bye Cruel World"
  414.     close
  415.     o
  416.     gosub ak
  417.     gosub review
  418.     return
  419. review    if !fcdemo echo "Sorry, the file \"cdemo\" is missing."; return
  420.     kill; read cdemo
  421.     del cut
  422.     <revv
  423.     review
  424.     echo "Let's play with that file."
  425.     echo "First, a word count"
  426.     wc cut
  427.     echo "Next, 32 bit file CRC, then a Unix style checksum"
  428.     crc cut; sum cut
  429.     sleep 100
  430.     return
  431.  
  432. cis    speed 2400 nolog 239-6124
  433.     pat 1i "^"
  434.     while !1&&L<8 wait -f2 if !1 echo "Sending ^C" put "\3"
  435. cis:    lput "\E[H\E[2J"
  436.     lput "SIG Download Browse hot keys: F3=B Protocol F8=XMODEM F7=capture"
  437.     lput "\E[2;24r\E[?6h\E[H"
  438.     pat 1 ID:; wait
  439.     put 70001,0001\r pat 1 assword:; wait; put "wrongo\r"
  440.     pat 1 OK; pat 2 Plex!; pat 3 "\nFunction: "; pat 4 "!"
  441.     set f3 "@source %lib/kcisdl.t"
  442.     set f7 "@source %lib/ckcisdl.t"
  443.     set f8 "@source %lib/xkcisdl.t"
  444.     wait
  445.     if n o return
  446.     pat; t -fcs!p
  447.     return
  448. cis02    speed 2400 nolog 222-2151    : Compuserve via Tymnet 2400 bps
  449.     pat 1i x; wait -f5 put A pat 1 "log in"; wait
  450.     put "cis02;"; goto cis
  451. cis02    speed 1200 nolog 222-0900    : Compuserve via Tymnet
  452.     pat 1i x; wait put A pat 1 "log in"; wait
  453.     put "\030cis02;" goto cis
  454. cisdat    speed 1200 %l-604-687-7144    : Compuserve via Datapac
  455.     sleep 25
  456.     ena -t
  457.     put "..\r"
  458.     pat 1 "DATAPAC"
  459.     wait -f4
  460.     put "P 29400138\r"
  461.     dis -t
  462.     pat 1 "Name:"
  463.     wait -f20
  464.     put "cis\r"
  465.     goto cis
  466. cistel    speed 1200 295-3028        : Compuserve via Telenet
  467.     pat 1 TERMINAL
  468.     while !1 put "\r" wait -f1
  469.     pat 1 @
  470.     put "D1\r"; wait -f4
  471.     if !1 o abort
  472.     put "C 202202\r"
  473.     goto cis
  474.  
  475. navobsy        speed 1200 %l-202-653-1079 t -u7e
  476.     echo " type @tco for list of commands "
  477. nbs        speed 300 %l-301-948-5717 t
  478. nbs2        speed 300 %l-301-948-5718 t
  479. oem        speed 1200 %s8 pat 1i \5;wait;put \1;sb;o
  480. omen-tech    speed 1200 %s8 t
  481. pl24    speed 2400 241-0496 goto pl1    : People-Link via Telenet
  482. pl    speed 1200 295-3028        : People-Link via Telenet
  483. pl1:    patt; patt 1 TERMINAL
  484.     while !1 put "\r" wait -f1
  485.     pf40 patt 1 @
  486.     put "D1\r"; wait
  487.     if !1 o abort
  488.     put "set 0:33,64:1\r"; wait -f1
  489.     put "c 312 63\r"
  490.     pat 1 "PRESS <RETURN>:";  wait -f15;  put "\r"
  491.     pat 1 "ID:";  wait -f15;  put "myacct\r"
  492.     pat 1 "PASSWORD:";  wait -f15;  put "nothis\r"
  493.     set f9 "/next\r"; set f10 "/dlo;fil;xmo;\r\r"
  494.     t
  495. source1200    speed 1200 295-3028    : The Source via Telenet
  496. sourcex:    set  f7 "upi n b "
  497.     set  f9 "upi n g "
  498.     set f8 ",-,*,rb"
  499.     set f10 ",-,*,sb"
  500.     pf3
  501.     patt; patt 1 TERMINAL
  502.     while "L<5&&!1" put "\r" wait -f1
  503.     if !1 off
  504.     pf40 patt 1 @
  505.     put "D1\r"; wait
  506.     if !1 o abort
  507.     put "c 30124\r"
  508.     kill; patt; patt 1 SOURCE; wait
  509.     if !1 o abort
  510.     putw "id ABC123 notthis\r"
  511.     patt; pat 10c "-More-" "@put \r lput \r\E[A\E[2M\E[A"
  512.     pf9999; wait
  513. source300    speed 300 295-3028    : The Source via Telenet
  514.     goto sourcex
  515. telegodzilla    speed 1200 %s8-3746
  516.     ena -Z; display overstrike; cls
  517.     pat 1 "ease:"; wait -f20
  518.     if !1||!c echo "Access Failed"; o; return
  519.     put "\b\b%s6 %s7\r"; pat 1 ect;wait -f2
  520.     put "y"; pat 1 "-Host"; wait -f5
  521.     set s0 "TeleGodzilla"
  522. tele1:    echo "You are now Online to \42%s0\42."
  523.     echo "Type F1 when done."; pat;  t -Z!vn
  524.     lput "\Ez Do you wish to disconnect (y/n) "
  525.     if y echo " Disconnecting ... ";put \25\4; wait -f2; o; return
  526.     echo " **************  Rewinding the Capture Buffer  ************** "
  527.     rewind; wait -f0; goto tele1
  528.  
  529. vms    speed 9600;  display vt100;  set bs "\177";  set rubout "\b";  z pd30
  530.     t
  531.  
  532. host    echo " host " speed 1200
  533.     set welcome welcome.txt
  534.     set password Ritchie
  535.     set challenge challeng.txt
  536.     set unrestrict "CustomerSupport"    : WARNING - CHANGE THIS!!
  537.     set xhelpfile xyamhelp.t
  538.     set private private; set messages messages
  539.     set emdir "."; set twxfile twx;
  540.     set call2 ATZ\r\336\336ATM1X1S0=1\r\336ATM1X1S0=1\r\336\336
  541.     set outahost "@pk512; putw ATM0H1\r"
  542.     set baudstr "@gosub baud"
  543.     pc40
  544.     return
  545.  
  546. sinit    pv0;  cls
  547.     echo "    Initial setup for ZCOMM with ZMODEM, WXMODEM, etc.        "
  548.     echo "             I need some phone information.                    "
  549.     accept s6 " Your \E[1mFirst\E[0m name please "
  550.     accept s7 " Your Last name please "
  551.     set s8 ""
  552. getac:    accept s8 " Please enter your 3 digit telephone area code, plus <Enter> "
  553.     if !%s8 goto getac
  554.     echo "I need access numbers for the Compuserve Information Service."
  555.     : if dd lput "Shall I search for them (y/n) ?"
  556.     : if dd if y echo "300/1200 bps Access Numbers"; find "%s8 " cisnodes.lst
  557.     echo "Just hit <Enter> if your modem doesn't have the indicated speed."
  558.     accept s3 " Please enter the 1200 baud local Compuserve Node phone Number "
  559.     accept s2 " Please enter the 300 baud local Compuserve Node phone Number "
  560.     accept s5 " Please enter the 1200 baud local Tymnet Node phone Number "
  561.     accept s4 " Please enter the 1200 baud local Telenet Node phone Number "
  562.     echo "Creating disk file 'LOCAL.T' for future reference"
  563.     kill; pv0; create -y local.t
  564.     echof " :Area Code is \042%s8\042"
  565.     if %s2 echof " set s2 \042%s2\042"
  566.     if %s3 echof " set s3 \042%s3\042"
  567.     if %s4 echof " set s4 \042%s4\042"
  568.     if %s5 echof " set s5 \042%s5\042"
  569.     if %s6 echof " set s6 \042%s6\042"
  570.     if %s7 echof " set s7 \042%s7\042"
  571.     echof " set s8 1-503-621"
  572.     lput "\EzAre you using a Color Monitor? (y/n) "
  573.     if y echof " if dd&&dc ps4 pn3 pr97 pu6"; ps4 pn3 pr97 pu6
  574.     lput "\r\nIs your display adapter flicker/snow free? (y/n) "
  575.     if y echof " if dd&&dc display warpdrive"; display warpdrive
  576.     lput "\r\nIs your modem connected to COM2? (y/n) "
  577.     if y echof " port 2"; port 2
  578.     lput "\r\nDo you use DTMF (TouchTone) dialing? (y/n) "
  579.     if y echof " set mprefix ATDT"
  580.     lput "\r\nDoes your modem include 2400 bps or higher? (y/n) "
  581.     if y echof " set mcommand \"gosub mm224\""; set mcommand "gosub mm224"
  582.     close; echo "file created"
  583.     if dd echo "Searching for directory entries with your area code"
  584.     if dd find l-%s8- %phones
  585.     if dd echo "Please change the %phones lines shown above to suit your area."
  586.     if !is8,503 return
  587.     kill; pv0; create -+ local.t
  588.     lput "Is 621-3746 (Burlington Exchange) a local call for you ? (y/n) "
  589.     if y echof " set s8 621"
  590.     else echof " set s8 1-621"
  591.     close; return
  592. quitt:    echo "   Type 'menu' to return to this menu   "
  593.     if Jf10,@ echo "       Press F10 for Flash-Up Help      "
  594.     echo "\n\n  The following ABORT message is normal "
  595.     abort
  596. carrier    lput " Type \ESy\Eq if the modem is now connected to a computer: "
  597.     if y echo "OK, just checking"; sleep 30; return
  598.     lput "\r\n\nAlthough ZCOMM can operarte with the modem's\r\n"
  599.     lput "Carrier Detect signal always on, this script (and most other\r\n"
  600.     lput "scripts) require the Carrier Detect signal to read the actual\r\n"
  601.     lput "modem status.  Please adjust the modem accordingly; on the Hayes\r\n"
  602.     lput "SmartModem 1200, switch 6 should be UP. "
  603.     off
  604. xdnum    cls
  605.     if jmcommand,mm224 sp 2400; goto xd1
  606.     lput "Use 2400 Baud (y/n) ? "
  607.     if y speed 2400;  goto xd1
  608.     lput "Use 300 Baud (y/n) ? "
  609.     if y speed 300; goto xd1
  610.     speed 1200;  echo "1200 Baud, then."
  611. xd1:    accept telno "Enter Telephone Number: "
  612.     if !%telno return
  613.     if Jmcommand,2 gosub mm224
  614.     if Jmcommand,l gosub dial
  615.     sets s0 "%telno"
  616.     goto tele1
  617. glocal    cls;  display nonlmode
  618.     lput "Use Port 2 (y/n) ?"
  619.     if y port 2
  620.     else port 1
  621.     gosub askspd
  622.     set s0 "Local"
  623. tele9:    echo "You are now Online to %s0."
  624.     echo "Type F1 when done."; pat;  t -Z!v
  625.     lput "\Ez Finished talking now (y/n) "
  626.     if y goto tele2
  627.     echo " **************  Rewinding the Capture Buffer  ************** "
  628.     rewind; wait -f0; goback tele9
  629. tele2:    lput "\Ez Do you wish to disconnect (y/n) "
  630.     if y echo " Disconnecting ... ";put \25\4; wait -f2; o
  631.     source local.t
  632.     return
  633. order    if forder display overstrike; page order; return
  634.  cls display overstrike
  635.  lput "ZCOMM Registration, Typeset Manual Pages, ZSNP, and update disk sell for $40.00.\r\n"
  636.  lput "                 (Add $10 if you wish a PC-size binder)\r\n"
  637.  lput "\r\n"
  638.  lput "       Send check to Omen Technology, PO Box 4681, Portland OR 97208\r\n"
  639.  lput "Please see Chapter 3 of the ZCOMM User's Manual for more information."
  640.  lput "\r\n"
  641.  return
  642. baud    pat 1 "CONNECT\r\n"; pat 2 "NO CARRIER"
  643.     pat 5 "CONNECT 1200\r\n"; pat 3 "CONNECT 2400\r\n"
  644.     pe-20
  645.     wait -Ef25
  646.     dis -E
  647.     if 1 speed 300 return
  648.     if 5 speed 1200 sleep 20 return
  649.     if 3 speed 2400 sleep 20 return
  650.     kill create -+ rings
  651.     close
  652.     fail
  653.  
  654.     : inittb initializes the TrailBlazer NVRAM for these scripts
  655.     : It may be necessary ot change the 9600 speed below if the
  656.     : NVRAM has been set to a strange value by somebody else
  657. inittb    sp 9600; ena -t; gosub waketb
  658.     putw "aaaaat&F S0=0 S7=45 S50=0 S52=1 S53=1 S54=1 S58=3 S68=3\r\336\336"
  659.     putw "AAAATS51=255 \r\336\336"
  660.     putw "aaaatS111=255 S95=0 S92=1 S52=2\r\336\336"
  661.     putw "aaaATJ6S39=3\r\336\336"    : MNP bugfix magic incantation
  662.     putw "aaaAT&W\r\336\336"
  663.     return
  664.  
  665.     : initmm initializes the MultiTech error correcting 224 NVRAM 
  666. initmm    speed 2400;  pat; pat 0 OK; pat 1 ERROR
  667.     put "AT &C1 E1 V1 X4 B1 &E0 S0=0 S7=45 S11=80 Q0\r"; wait -f5
  668.     if 1 echo "ERROR: cycle power on the modem and retry this script"; abort
  669.     put "AT &D3 &C1 &T5 &E10 \44BA1 &B1\r"; wait -f5
  670.     put at&w\r; wait -f5
  671.     return
  672.  
  673.     : initc24e initializes the US Robotics Courier 2400E
  674. initc24e    speed 2400;  pat; pat 0 OK; pat 1 ERROR
  675.     put "AT &F E1 V1 X6 B1 &G0 &Y1 S0=0 S7=45 S11=80 Q0\r"; wait -f5
  676.     if 1 echo "ERROR: cycle power on the modem and retry this script"; abort
  677.     put at&w\r; wait -f5
  678.     return
  679.  
  680.     : inithv96 initializes the Hayes V9600 NVRAM 
  681. inithv96    bye;  sleep 20;  speed 2400;  pat; pat 0 OK; pat 1 ERROR
  682.     set s1 "K4"; if dF set s1 "K3"
  683.     put "AT &F V1 X4 W1 B1 &K0 &Q5 S36=1 S37=0 S0=0 S7=45\r"; wait -f5
  684.     if 1 echo "ERROR: cycle power on the modem and retry this script"; abort
  685.     put "AT &D3 &C1 &R1 &%s1 &T5 &W0 &Y1 &W0\r"; wait -f5
  686.     return
  687.  
  688.     : initfc initializes a Fastcomm 2496t high speed modem
  689. initfc    sp 9600; gosub waketb
  690.     putw "AT #LDN #LCN S57=2 #W\r";  return
  691.  
  692.     : initsm initializes a Hayes Smartcom 2400
  693. initsm    putw "at &c1 &d2 x3 v1 e1 q0 &s1 s7=45\r"; sleep 5; putw at&w\r
  694.     return
  695.  
  696.     : initax9624 inits a Microcom AX/9624c MNP Class 6 modem    
  697. initax9624    bye;  sleep 20;  speed 2400;  pat; pat 0 OK; pat 1 ERROR
  698.     set s1 "\\Q1"; if dF set s1 "\\Q3"
  699.     put "AT &F V1 \\V1 &D3 Q0 E1 &C1 \\N0 X4 %s1 S0=0 S7=45\r"; wait -f5
  700.     if 1 echo "ERROR: Reset the modem and retry this script"; abort
  701.     put "AT &W\r"; wait -f5
  702.     return
  703.  
  704.  
  705.     :: Generate a script with TurboLearn Script Writer(TM)
  706. tlearn    set fa10 "" :: telephone number, and flag that telno was entered
  707.     if c goto connected
  708.     cls
  709.     accept fa10 "Enter Telephone Number "
  710. ag1:    accept fa1 "Enter Speed (300, 1200, 2400) "
  711.     if ifa1,2400 speed 2400 goto ag2
  712.     if ifa1,1200 speed 1200 goto ag2
  713.     if ifa1,300 speed 300 goto ag2
  714.     echo "Bad speed"; goback ag1
  715. ag2:    lput "\r\n1    System uses IBM PC (ANSI) line drawing characters\r\n"
  716.     lput "2    System uses 7 bits even parity\r\n"
  717.     lput "3    System uses 8 bits No parity (8n1)\r\n"
  718.     lput "\r\n"
  719.     acceptl1 fa2 "Choose one of the above: "
  720.     lput "\r\n"
  721.     ena -8n
  722.     @%fa10
  723.     if !c echo "Sorry, no connection"; return
  724.     set fa5 ""
  725.     if ifa2,1 ena -8g; set fa5 "ena -8g"
  726.     if ifa2,2 ena -7e; set fa5 "ena -7e"
  727. connected:
  728.     echo "Finish with F1.  Use ALT-B to send a break if necessary"
  729.     learn -y tlrn.tmp
  730. cn2:    if !r echo "WARNING: Learning (recording) terminated prematurely!"
  731.     close
  732.     kill
  733.     create newscr.t
  734.     if !r abort
  735.     echo "Is this to become a Telephone Directory entry (y/n)?"
  736.     if !y goto nodir
  737.     accept fa6 "What directory entry name to use? "
  738.     echoc "%fa6    speed %fa1 %fa10 %fa5"
  739. nodir:    close;  set fa2 ""
  740.     echo "Should the script disconnect the phone line (y/n) ?"
  741.     if !y "!tlearn tlrn.tmp >>newscr.t"; goto scdone
  742.     set fa2 "bye;  return"
  743.     echo "Should the script then exit to the Operating System (y/n)?"
  744.     if y  set fa2 "off"
  745.     !tlearn -r tlrn.tmp >>newscr.t
  746.     create -+ newscr.t; echof "    %fa2";  close
  747. scdone:    echo "Your new script is in the file 'newscr.t' !!"
  748.     if %fa10 echo "You may add this file to your Telephone Directory"
  749.     if %fa10 echo "Or execute it with 'call %fa6.newscr.t'";  return
  750.     echo "You may execute this file with 'source newscr.t'"
  751.     return
  752.  
  753.     :: Add a telephone directory entry
  754. add    if r close
  755.     cls
  756.     echo "Create New Phone Directory Entry"
  757. xg0:    accept fa3 "Enter new directory name: "
  758.     p?0
  759.     lput "Searching for duplicate name"
  760.     find "\n%fa3" %phones
  761.     if ? echo "Please choose another name"; goback xg0
  762.     accept fa4 "Enter Comments for this number: "
  763.     accept fa10 "Enter Telephone Number: "
  764. xg1:    accept fa1 "Enter Speed (300, 1200, 2400, 9600, 19200): "
  765.     if ifa1,19200 speed 2400 goto xg2
  766.     if ifa1,9600 speed 2400 goto xg2
  767.     if ifa1,2400 speed 2400 goto xg2
  768.     if ifa1,1200 speed 1200 goto xg2
  769.     if ifa1,300 speed 300 goto xg2
  770.     echo "Bad speed"; goback xg1
  771. xg2:    lput "\r\n1    System uses IBM PC (ANSI) line drawing characters\r\n"
  772.     lput "2    System uses 7 bits even parity\r\n"
  773.     lput "3    System uses 8 bits No parity (8n1)\r\n"
  774.     lput "\r\n"
  775.     acceptl1 fa2 "Choose one of the above: "
  776.     lput "\r\n"
  777.     set fa5 ""
  778.     if ifa2,1 set fa5 " -8g"
  779.     if ifa2,2 set fa5 " -7e"
  780.     kill; pv0; create -+ %phones
  781.     if !%fa4 goto nobanr
  782.     echoc "%fa3    speed %fa1 echo \42%fa4\42 %fa10 t%fa5"
  783.     close; return
  784. nobanr:    echoc "%fa3    speed %fa1 %fa10 t%fa5"
  785.     close; return
  786.  
  787.     :: Login script for Byte Information Exchange
  788. bix        speed 19200  222-2151+222-0900
  789.         pat 1 "log in"
  790.         pat 2 "error" "\r"
  791.         pat 3 "user name:"
  792.         pat 5 "host shut"
  793.         wait -f4; put "A"; wait -f2
  794.         set s9 "login"; pf15
  795. bix:        put "BIX\r"
  796.         pat 4i "ame?"; wait
  797.         if 5 fail
  798.         if "c&&!4" goback bix
  799.         if jargs,new put "new\r";  t; quit
  800.         put "accntname\r"
  801.         pat 1i "assword:"; wait
  802.         dis -h;  put "notthis\r"
  803.         if dZ zmodem pl8192    :: Temporary - see manual
  804.         if dZ ena -yZ        :: Disable ZMODEM Challenge to save time
  805.         if jargs,h ena -h
  806.         pat; pat 1$ "\n:"
  807.         wait
  808.         if "hYou have [*1-9]" source bixmaild.t
  809.         expand bixmailu.t 002*
  810.         if jargs,off off
  811.         t
  812.  
  813. genie        speed 1200 287-9045
  814.         lput "\E[H\E[2J"
  815.         lput "\E[1mDownload hot key: F3=XMODEM F8=OverThruster\E[m"
  816.         lput "\E[2;24r\E[?6h\E[H"
  817.         ena -7e; pat 1 "U#"
  818.         while "c&&L<8&&!1" put "\r" wait -f2
  819.         if !1 echo "No Response from Genie"; o; fail
  820.         pat 2 "PASS"
  821.         while !2 put "abc12345,\r"  wait -f5
  822.         put "abcd\r"
  823. gen3:        set f3 "@set s5 xx; source %lib/gekxdl.t"
  824.         set f8 "@set s5 x; source %lib/gekxdl.t"
  825.         pO20; if S>2400 pO40
  826.         ph2; ena -h
  827.         t; ret
  828. dial    pat
  829.     if "%telno<2" echo "Please do not use \"call dial\""; abort
  830.     bye
  831.     if "%mprefix<2" goto mandial
  832.     pat 9 K\r\n; ena -d
  833.     put "ATZ\r"; wait -f3; if !9 wait -f3
  834.     if !9 put "AT E1 Q0 S7=60 V1 X1\r"; wait -f3
  835.     if "!9&&S>1201" speed 1200 put "ATZ\r"; wait -f3; if !9 wait -f3
  836.     if "!9&&S>301" speed 300 put "ATZ\r"; wait -f3; if !9 wait -f3
  837.     if !9 put "AT E1 Q0 S7=60 V1 X1\r"; wait -f3
  838.     if !9 echo "No response From MODEM"; fail
  839.     sleep 4
  840.     put "ATS6=3 S8=4 S0=0\r" wait -f2
  841.     pat 1l CONNECT; pat 2 "NO CARRIER"; pat 3 "BUSY"; pat 4 RING;
  842.     pat 0c ";"
  843.     dis -d
  844.     put %mprefix; putw %telno\r
  845.     if 0 wait -f30; accept s1 "Hit ENTER to Hang Up"; o; return
  846.     wait -f60
  847.     while "4&&!L>3" wait -f30
  848.     while "!c&&L<20" sleep 1    : Some modems are slow on carrier det
  849.     if 1 pat; return
  850.     if !9 bye
  851.     pat; bye; fail
  852.     echo "fail DIDN't FAIL!!"
  853. mandial:    echo "Please dial %telno, type 'y' when connected, 'n' if failed"
  854.     if y return
  855.     fail
  856.  
  857.